/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lista11.exercicio1;

/**
 *
 * @author carlos
 */
public class losango {

    private String nome;
    private double ladoA;
    private double ladoB;

    public losango(double ladoA, double ladoB) {
        this.ladoA = ladoA;
        this.ladoB = ladoB;
    }

    public losango(String nome, double ladoA, double ladoB) {
        this.nome = nome;
        this.ladoA = ladoA;
        this.ladoB = ladoB;
    }

    public double getLadoA() {
        return ladoA;
    }

    public void setLadoA(double ladoA) {
        this.ladoA = ladoA;
    }

    public double getLadoB() {
        return ladoB;
    }

    public void setLadoB(double ladoB) {
        this.ladoB = ladoB;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public double perimetro() {
        return (this.getLadoA() * 2) + (this.getLadoB() * 2);
    }

    public double areaLosango() {
        return (this.getLadoA() * this.getLadoB()) / 2;
    }
}
